Skip to content

Conversation

phansch
Copy link
Contributor

@phansch phansch commented Feb 21, 2018

This makes it so that the empty_line_after_outer_attribute lint only
checks for newlines between the end of the attribute and the beginning
of the following item.

We need to check for the empty line count being bigger than 2 because
now the snippet of valid code contains only \n and splitting it
produces ["", ""]
Invalid code would contain more than 2 empty strings.

Closes #2428

This makes it so that the `empty_line_after_outer_attribute` lint only
checks for newlines between the end of the attribute and the beginning
of the following item.

We need to check for the empty line count being bigger than 2 because
now the snippet of valid code contains only `\n` and splitting it
produces `["", ""]`
Invalid code will contain more than 2 empty strings.
@oli-obk oli-obk merged commit 5e6342d into rust-lang:master Feb 21, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Feb 21, 2018

Nice fix

@phansch phansch deleted the handle_multiline_attributes branch February 21, 2018 20:49
@phansch
Copy link
Contributor Author

phansch commented Feb 21, 2018

Ah that issue reference was a PR not the issue to be closes 😭 This one should be closed: #2460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants